﻿USE [travel]
GO

/****** Object:  Table [dbo].[wb_advertisement]    Script Date: 02/27/2013 16:02:03 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[wb_advertisement](
	[id] [nvarchar](50) NOT NULL,
	[title] [nvarchar](100) NULL,
	[adnum] [nvarchar](50) NULL,
	[picpath] [nvarchar](1000) NULL,
	[weburl] [nvarchar](1000) NULL,
	[cost] [nvarchar](50) NULL,
	[height] [int] NULL,
	[width] [int] NULL,
	[starttime] [datetime] NULL,
	[endTime] [datetime] NULL,
	[type] [int] NULL,
	[isuse] [int] NULL,
	[comment] [nvarchar](300) NULL,
	[js] [nvarchar](1000) NULL,
	[created_on] [datetime] NULL,
	[created_by] [nvarchar](50) NULL,
	[changed_on] [datetime] NULL,
	[changed_by] [nvarchar](50) NULL,
PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'id'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'title'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告位编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'adnum'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'picpath'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'weburl'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'价值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'cost'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'高' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'height'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'宽' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'width'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开始日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'starttime'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结束日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'endTime'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告形式 0:图片 1:flash' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'type'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否在用 0:否 1:是' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'isuse'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'comment'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'JS' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'js'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'created_on'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'created_by'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后一次修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'changed_on'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后一次修改人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement', @level2type=N'COLUMN',@level2name=N'changed_by'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告位管理表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wb_advertisement'
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ('') FOR [title]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ('') FOR [adnum]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ('') FOR [picpath]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ('') FOR [weburl]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ('') FOR [cost]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ((0)) FOR [height]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ((0)) FOR [width]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ((0)) FOR [type]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ((0)) FOR [isuse]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ('') FOR [comment]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ('') FOR [js]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ('') FOR [created_by]
GO

ALTER TABLE [dbo].[wb_advertisement] ADD  DEFAULT ('') FOR [changed_by]
GO


